package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.TemplateGradeSetEntity;
import com.dragon.modules.yuegou.enums.member.TemplateGradeSetGradeCondition;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 会员卡等级条件表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-12-16 14:57:41
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class TemplateGradeSetQuery extends TemplateGradeSetEntity implements Query<TemplateGradeSetEntity> {

    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员卡模板设置id查询条件 */
	@JsonUnwrapped(prefix = "templateSetId")
	private Condition<String> templateSetIdCondition;

    /** 会员卡等级设置id查询条件 */
	@JsonUnwrapped(prefix = "templateGradeId")
	private Condition<String> templateGradeIdCondition;

    /** [枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件 */
	@JsonUnwrapped(prefix = "gradeCondition")
	private Condition<TemplateGradeSetGradeCondition> gradeConditionCondition;

    /** 会员卡等级条件参数id查询条件 */
	@JsonUnwrapped(prefix = "memGradeParamId")
	private Condition<String> memGradeParamIdCondition;

    /** 会员卡等级条件参数名称查询条件 */
	@JsonUnwrapped(prefix = "memGradeParamName")
	private Condition<String> memGradeParamNameCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public TemplateGradeSetQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public TemplateGradeSetQuery(TemplateGradeSetEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public TemplateGradeSetQuery(TemplateGradeSetQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.templateSetIdCondition != null) {
			this.templateSetIdCondition = other.templateSetIdCondition.copy();
		}
		if(other.templateGradeIdCondition != null) {
			this.templateGradeIdCondition = other.templateGradeIdCondition.copy();
		}
		if(other.gradeConditionCondition != null) {
			this.gradeConditionCondition = other.gradeConditionCondition.copy();
		}
		if(other.memGradeParamIdCondition != null) {
			this.memGradeParamIdCondition = other.memGradeParamIdCondition.copy();
		}
		if(other.memGradeParamNameCondition != null) {
			this.memGradeParamNameCondition = other.memGradeParamNameCondition.copy();
		}
	}

	@Override
	public QueryWrapper<TemplateGradeSetEntity> toQueryWrapper() {
		QueryWrapper<TemplateGradeSetEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (templateSetIdCondition != null) {
			templateSetIdCondition.toWrapper(wrapper, COL_TEMPLATE_SET_ID);
		}
		if (templateGradeIdCondition != null) {
			templateGradeIdCondition.toWrapper(wrapper, COL_TEMPLATE_GRADE_ID);
		}
		if (gradeConditionCondition != null) {
			gradeConditionCondition.toWrapper(wrapper, COL_GRADE_CONDITION);
		}
		if (memGradeParamIdCondition != null) {
			memGradeParamIdCondition.toWrapper(wrapper, COL_MEM_GRADE_PARAM_ID);
		}
		if (memGradeParamNameCondition != null) {
			memGradeParamNameCondition.toWrapper(wrapper, COL_MEM_GRADE_PARAM_NAME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员卡模板设置id查询条件
	 * 
	 * @return templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public Condition<String> templateSetId() {
		this.templateSetIdCondition = new Condition<>();
		return this.templateSetIdCondition;
	}
	
	/**
	 * 获取会员卡模板设置id查询条件
	 * 
	 * @return templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public Condition<String> getTemplateSetIdCondition() {
		return templateSetIdCondition;
	}

	/**
	 * 设置会员卡模板设置id查询条件
	 * 
	 * @param templateSetIdCondition 会员卡模板设置id查询条件
	 */
	public void setTemplateSetIdCondition(Condition<String> templateSetIdCondition) {
		this.templateSetIdCondition = templateSetIdCondition;
	}

	/**
	 * 构造并返回会员卡等级设置id查询条件
	 * 
	 * @return templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public Condition<String> templateGradeId() {
		this.templateGradeIdCondition = new Condition<>();
		return this.templateGradeIdCondition;
	}
	
	/**
	 * 获取会员卡等级设置id查询条件
	 * 
	 * @return templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public Condition<String> getTemplateGradeIdCondition() {
		return templateGradeIdCondition;
	}

	/**
	 * 设置会员卡等级设置id查询条件
	 * 
	 * @param templateGradeIdCondition 会员卡等级设置id查询条件
	 */
	public void setTemplateGradeIdCondition(Condition<String> templateGradeIdCondition) {
		this.templateGradeIdCondition = templateGradeIdCondition;
	}

	/**
	 * 构造并返回[枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 * 
	 * @return gradeConditionCondition [枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 */
	public Condition<TemplateGradeSetGradeCondition> gradeCondition() {
		this.gradeConditionCondition = new Condition<>();
		return this.gradeConditionCondition;
	}
	
	/**
	 * 获取[枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 * 
	 * @return gradeConditionCondition [枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 */
	public Condition<TemplateGradeSetGradeCondition> getGradeConditionCondition() {
		return gradeConditionCondition;
	}

	/**
	 * 设置[枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 * 
	 * @param gradeConditionCondition [枚举]等级条件：0-满足任一条件-ANY、1-满足所有条件-ALL查询条件
	 */
	public void setGradeConditionCondition(Condition<TemplateGradeSetGradeCondition> gradeConditionCondition) {
		this.gradeConditionCondition = gradeConditionCondition;
	}

	/**
	 * 构造并返回会员卡等级条件参数id查询条件
	 * 
	 * @return memGradeParamIdCondition 会员卡等级条件参数id查询条件
	 */
	public Condition<String> memGradeParamId() {
		this.memGradeParamIdCondition = new Condition<>();
		return this.memGradeParamIdCondition;
	}
	
	/**
	 * 获取会员卡等级条件参数id查询条件
	 * 
	 * @return memGradeParamIdCondition 会员卡等级条件参数id查询条件
	 */
	public Condition<String> getMemGradeParamIdCondition() {
		return memGradeParamIdCondition;
	}

	/**
	 * 设置会员卡等级条件参数id查询条件
	 * 
	 * @param memGradeParamIdCondition 会员卡等级条件参数id查询条件
	 */
	public void setMemGradeParamIdCondition(Condition<String> memGradeParamIdCondition) {
		this.memGradeParamIdCondition = memGradeParamIdCondition;
	}

	/**
	 * 构造并返回会员卡等级条件参数名称查询条件
	 * 
	 * @return memGradeParamNameCondition 会员卡等级条件参数名称查询条件
	 */
	public Condition<String> memGradeParamName() {
		this.memGradeParamNameCondition = new Condition<>();
		return this.memGradeParamNameCondition;
	}
	
	/**
	 * 获取会员卡等级条件参数名称查询条件
	 * 
	 * @return memGradeParamNameCondition 会员卡等级条件参数名称查询条件
	 */
	public Condition<String> getMemGradeParamNameCondition() {
		return memGradeParamNameCondition;
	}

	/**
	 * 设置会员卡等级条件参数名称查询条件
	 * 
	 * @param memGradeParamNameCondition 会员卡等级条件参数名称查询条件
	 */
	public void setMemGradeParamNameCondition(Condition<String> memGradeParamNameCondition) {
		this.memGradeParamNameCondition = memGradeParamNameCondition;
	}

}
